filechooserentry: Remove _gtk_file_chooser_entry_set_file_part()
authorBenjamin Otte <otte@redhat.com>
Mon, 7 Nov 2011 02:33:18 +0000 (03:33 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 16 Dec 2011 19:09:13 +0000 (20:09 +0100)
gtk_entry_set_text() is fine.

gtk/gtkfilechooserdefault.c
gtk/gtkfilechooserentry.c
gtk/gtkfilechooserentry.h

index 8616b76ce46d84d7cfec903f64756d4c78402f4d..3236a7cc9c2b11e8ace464a1e4487c1f6c8676bb 100644 (file)
@@ -7070,7 +7070,7 @@ update_chooser_entry (GtkFileChooserDefault *impl)
 
           if (change_entry)
             {
-              _gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->location_entry), impl->browse_files_last_selected_name);
+              gtk_entry_set_text (GTK_ENTRY (impl->location_entry), impl->browse_files_last_selected_name);
 
               if (impl->action == GTK_FILE_CHOOSER_ACTION_SAVE)
                 _gtk_file_chooser_entry_select_filename (GTK_FILE_CHOOSER_ENTRY (impl->location_entry));
@@ -7102,7 +7102,7 @@ update_chooser_entry (GtkFileChooserDefault *impl)
       g_free (impl->browse_files_last_selected_name);
       impl->browse_files_last_selected_name = NULL;
 
-      _gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->location_entry), "");
+      gtk_entry_set_text (GTK_ENTRY (impl->location_entry), "");
       return;
     }
 
@@ -7137,7 +7137,7 @@ update_chooser_entry (GtkFileChooserDefault *impl)
         clear_entry = FALSE;
 
       if (clear_entry)
-        _gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->location_entry), "");
+        gtk_entry_set_text (GTK_ENTRY (impl->location_entry), "");
     }
 }
 
@@ -7333,7 +7333,7 @@ update_current_folder_get_info_cb (GCancellable *cancellable,
                                               impl->current_folder);
 
       if (data->clear_entry)
-       _gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->location_entry), "");
+        gtk_entry_set_text (GTK_ENTRY (impl->location_entry), "");
     }
 
   /* Create a new list model.  This is slightly evil; we store the result value
@@ -7448,7 +7448,7 @@ gtk_file_chooser_default_set_current_name (GtkFileChooser *chooser,
                    impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER);
 
   pending_select_files_free (impl);
-  _gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->location_entry), name);
+  gtk_entry_set_text (GTK_ENTRY (impl->location_entry), name);
 }
 
 static gboolean
@@ -9916,7 +9916,7 @@ shortcuts_activate_iter (GtkFileChooserDefault *impl,
   if (impl->location_entry
       && !(impl->action == GTK_FILE_CHOOSER_ACTION_SAVE
           || impl->action == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER))
-    _gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->location_entry), "");
+    gtk_entry_set_text (GTK_ENTRY (impl->location_entry), "");
 
   gtk_tree_model_get (GTK_TREE_MODEL (impl->shortcuts_model), iter,
                      SHORTCUTS_COL_DATA, &col_data,
@@ -10236,7 +10236,7 @@ static void
 location_set_user_text (GtkFileChooserDefault *impl,
                        const gchar           *path)
 {
-  _gtk_file_chooser_entry_set_file_part (GTK_FILE_CHOOSER_ENTRY (impl->location_entry), path);
+  gtk_entry_set_text (GTK_ENTRY (impl->location_entry), path);
   gtk_editable_set_position (GTK_EDITABLE (impl->location_entry), -1);
 }
 
index 693c8d7a5766ce2f68551d2498d9e44dc17aa1b3..b2bb658280d5f6c474b84463161f11bf1c76b310 100644 (file)
@@ -1009,26 +1009,6 @@ _gtk_file_chooser_entry_get_file_part (GtkFileChooserEntry *chooser_entry)
     return text;
 }
 
-/**
- * _gtk_file_chooser_entry_set_file_part:
- * @chooser_entry: a #GtkFileChooserEntry
- * @file_part: text to display in the entry, in UTF-8
- *
- * Sets the current text shown in the file chooser entry.
- **/
-void
-_gtk_file_chooser_entry_set_file_part (GtkFileChooserEntry *chooser_entry,
-                                      const gchar         *file_part)
-{
-  g_return_if_fail (GTK_IS_FILE_CHOOSER_ENTRY (chooser_entry));
-
-  chooser_entry->in_change = TRUE;
-  clear_completions (chooser_entry);
-  gtk_entry_set_text (GTK_ENTRY (chooser_entry), file_part);
-  chooser_entry->in_change = FALSE;
-}
-
-
 /**
  * _gtk_file_chooser_entry_set_action:
  * @chooser_entry: a #GtkFileChooserEntry
index f01e47bbafd52992576b64dc242ae48e9a288728..216b8ae72479d72a2719468abb1c60f2ebe4ec1e 100644 (file)
@@ -39,8 +39,6 @@ void               _gtk_file_chooser_entry_set_action         (GtkFileChooserEnt
 GtkFileChooserAction _gtk_file_chooser_entry_get_action       (GtkFileChooserEntry *chooser_entry);
 void               _gtk_file_chooser_entry_set_base_folder    (GtkFileChooserEntry *chooser_entry,
                                                               GFile               *folder);
-void               _gtk_file_chooser_entry_set_file_part      (GtkFileChooserEntry *chooser_entry,
-                                                              const gchar         *file_part);
 GFile *            _gtk_file_chooser_entry_get_current_folder (GtkFileChooserEntry *chooser_entry);
 const gchar *      _gtk_file_chooser_entry_get_file_part      (GtkFileChooserEntry *chooser_entry);
 gboolean           _gtk_file_chooser_entry_get_is_folder      (GtkFileChooserEntry *chooser_entry,